package lormi.meipin.controller.api;

import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import lormi.meipin.common.LMWeiXinAPI;
import lormi.meipin.controller.BaseController;
import lormi.meipin.exception.LMException;

/**
 * 用于微信web端通过邀请码注册自动填写邀请码
 */
@RestController
@RequestMapping("weixin")
public class WeiXinController extends BaseController{
	
	@RequestMapping("qrcode/{code}")
	public String getQrCode(@PathVariable Integer code) throws LMException{
		return LMWeiXinAPI.getQrCode(code);
	}
	
	@RequestMapping("incode/{openid}")
	public String getIncode(@PathVariable String openid){
		
		return invitationLogService.getCode(openid);
	}
	
}
